import axios from 'axios'

const request = axios.create({
  baseURL: 'http://geek.itheima.net/v1_0'
})

request.interceptors.request.use(
  config => {
    return config
  },
  err => {
    return Promise.reject(err)
  }
)
request.interceptors.response.use(
  res => {
    return res
  },
  err => {
    return Promise.reject(err)
  }
)

export default request